#ifndef __THREAD_POOL_H__
#define __THREAD_POOL_H__

#include "queue.h"
#include "main.h"

typedef struct _threadPool {
    int threadCount;
    queue_t *pThreadQueue;
    pthread_t *pThreadIds;
    pthread_mutex_t mutex;
    pthread_cond_t cond;
} threadPool_t;

int threadPoolInit(int threadCount, threadPool_t **ppThreadPool);
int threadPoolStart(threadPool_t *pThreadPool);
int getOneFrame(int clientFileDescribe, protocol_t *pProtocol);
int sendMessage(int clientFileDescribe, const char *message);

#endif